Page({
  data: {
    statusBarHeight: 0,
    pushEnabled: true,
    vibrateEnabled: true,
    autoSound: false,
    volume: 50
  },

  onLoad() {
    this.setData({
      statusBarHeight: wx.getSystemInfoSync().statusBarHeight || 0
    });
  },

  goBack() {
    wx.navigateBack();
  },

  onPushChange(e: any) {
    this.setData({ pushEnabled: e.detail.value });
  },

  onVibrateChange(e: any) {
    this.setData({ vibrateEnabled: e.detail.value });
  },

  onAutoSoundChange(e: any) {
    this.setData({ autoSound: e.detail.value });
  },

  onVolumeChange(e: any) {
    this.setData({ volume: e.detail.value });
  }
});
